//
//  TEViewViewController.m
//  TintExample
//
//  Created by Kevin Wu on 4/2/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "TEViewViewController.h"


@implementation TEViewViewController


- (void)loadView {
    [super loadView];
    
    //self.view.backgroundColor = [UIColor lightGrayColor];
    
    _shadowView = [[TTView alloc] init];
    _shadowView.backgroundColor = [UIColor redColor];
    _shadowView.frame = CGRectMake(10.0, 100.0, 300.0, 100.0);
    [self.view addSubview:_shadowView];
    
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self addButtonWithTitle:@"Toggle shadow" selector:@selector(toggleShadows:)];
    [self addButtonWithTitle:@"Toggle drop shadow" selector:@selector(toggleDropShadow:)];
}

- (void)toggleShadows:(id)sender {
    static BOOL showShadow = NO;
    showShadow = !showShadow;
    
    _shadowView.showTopShadow = showShadow;
    _shadowView.showBottomShadow = showShadow;
}

- (void)toggleDropShadow:(id)sender {
    [_shadowView dropShadowWithOpacity:0.9];
}

@end
